package com.mg.admin.dao.admin;

import com.mg.admin.annotation.MyBatis;
import com.mg.admin.bean.admin.UserVO;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.session.RowBounds;

import java.util.List;

@MyBatis
public interface UserMapper {
	UserVO selectById(Long id);

    UserVO selectByNameAndPwd(@Param("userName") String userno, @Param("password") String password);

    UserVO findByExample(UserVO userVO);

    List<UserVO> findByParentOrgId(@Param("orgId") Long orgId, RowBounds rb);

    int getCountByParentOrgId(@Param("orgId") Long orgId, RowBounds rb);

    void insertOne(UserVO userVO);

    void insertUserRoleOrg(UserVO userVo);

    void updateOne(UserVO userVO);

    void updateUserRoleOrg(UserVO userVO);

    UserVO findByUserName(@Param("userName")String username);

    void delete(@Param("id") Long id);

    void deleteUserRoleOrg(@Param("userId") Long userId);

    void updateByUserName(UserVO userVO);
}
